import React, {
    lazy,
    Suspense
} from "react";
import {useRoutes} from "react-router-dom";
import {lazyLoading} from "@/utils";
import AuthComponent from "@/components/AuthComponent";

export default function () {
    return useRoutes([
        {
            path: "/",
            element:(
                <AuthComponent>
                    {
                        lazyLoading("Index")
                    }
                </AuthComponent>
            )
        }, {
            path: "/login",
            element: lazyLoading("Login")
        }, {
            path: "*",
            element: lazyLoading("NotFound")
        }
    ])
}
